import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

Vue.config.productionTip = false;

Vue.directive("bg", (el) => {
  el.style.backgroundColor = store.state.color;
  // el代表自定义指令作用的元素
});
//全局的在哪里都能用 自定义指令

import myHeader from "@/components/myHeader.vue";
Vue.component("myHeader", myHeader);

import Vant from "vant";
import "vant/lib/index.css";

Vue.use(Vant);

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
